using System.Threading.Tasks;
using ThridGroup.ERP.Application.Contracts.DTO.Common;
using ThridGroup.ERP.Application.Contracts.DTO.WarehouseManagement;

namespace ThridGroup.ERP.WarehouseManagement
{
    /// <summary>
    /// 库位设置服务接口
    /// </summary>
    public interface IWarehouseLocationSettingService
    {
        /// <summary>
        /// 获取库位设置列表
        /// </summary>
        /// <param name="input">查询条件</param>
        /// <returns>库位设置列表</returns>
        Task<PagedResultDto<WarehouseLocationSettingDto>> GetListAsync(GetWarehouseLocationSettingListInput input);
        
        /// <summary>
        /// 根据ID获取库位设置
        /// </summary>
        /// <param name="id">库位设置ID</param>
        /// <returns>库位设置</returns>
        Task<WarehouseLocationSettingDto> GetByIdAsync(int id);
        
        /// <summary>
        /// 创建库位设置
        /// </summary>
        /// <param name="input">创建参数</param>
        /// <returns>创建后的库位设置</returns>
        Task<WarehouseLocationSettingDto> CreateAsync(CreateUpdateWarehouseLocationSettingDto input);
        
        /// <summary>
        /// 更新库位设置
        /// </summary>
        /// <param name="id">库位设置ID</param>
        /// <param name="input">更新参数</param>
        /// <returns>更新后的库位设置</returns>
        Task<WarehouseLocationSettingDto> UpdateAsync(int id, CreateUpdateWarehouseLocationSettingDto input);
        
        /// <summary>
        /// 删除库位设置
        /// </summary>
        /// <param name="id">库位设置ID</param>
        /// <returns>任务</returns>
        Task DeleteAsync(int id);
        
        /// <summary>
        /// 检查库位编码是否已存在
        /// </summary>
        /// <param name="code">库位编码</param>
        /// <param name="id">排除的ID</param>
        /// <returns>是否存在</returns>
        Task<bool> IsCodeExistAsync(string code, int id = 0);
    }
} 